Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deprecation warnings in nvim 0.10 #170

Merged
merged 6 commits into from
May 23, 2024

Conversation

aarondill
Copy link
Contributor

This fixes several deprecation warnings in nvim 0.10.
It should still work in previous versions.

  • fix: vim.lsp.buf_get_clients is deprecated
  • fix: vim.loop is deprecated
  • fix: vim.api.nvim_buf_get_option is deprecated

@aarondill aarondill requested a review from amirbilu as a code owner May 18, 2024 04:38
@amirbilu
Copy link
Contributor

@aarondill thanks for the contribution. Was it tested on previous versions?

@aarondill
Copy link
Contributor Author

I've tested everything except for the chat changes (which should still work) on NVIM v0.9.5 built from source, as well as NVIM v0.11.0-dev-49+g10601ac5f (latest HEAD).
I don't use the chat, and I don't want to go through the trouble of making it work on my machine. If you'd like to test it, feel free, but vim.bo has existed since at least NVIM v0.5.0 (see neovim/neovim@43956de where it is already included in the docs).

Obviously the change in the readme is not backwards compatible, so older users still need to change it back to vim.loop. I can add a note if you'd like, but I think it's fine with vim.uv

@amirbilu
Copy link
Contributor

Can you elaborate on needed in readme? Not sure I got this point

@aarondill
Copy link
Contributor Author

@amirbilu In the README, I changed the reference to vim.loop.os_uname() to vim.uv.os_uname() for the "platform dependant build script". If one were to copy that code and use it before nvim 0.10.0, it would error.
If you want, I can add a note in the readme saying this and telling anyone running pre-0.10 to replace vim.uv with vim.loop

@amirbilu
Copy link
Contributor

Got you

Copy link
Contributor

@amirbilu amirbilu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
If you can please add a comment in the README + document somewhere to remove the fallback once vim.loop is deprecated

@aarondill
Copy link
Contributor Author

aarondill commented May 23, 2024

@amirbilu I added the note to the readme in 84768b0

@amirbilu amirbilu merged commit ccca333 into codota:master May 23, 2024
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants